<?php
namespace app\index\controller;

use think\Request;
use \app\admin\model\Aboutus as AboutusModel;

class Aboutus extends Base
{
    protected $model;

    public function __construct(Request $request = null)
    {
        parent::__construct($request);

        $this->model = new AboutusModel();
    }

    public function index($id = null)
    {
        $data = $this->model->find($id);
        
        $data->clicks +=1;
        
        @$data->save();

        $this->assign('data', $data);
        return $this->fetch();
    }
}
